  import {mapGetters} from 'vuex'
  export default {
  	data() {
  		return {
  			
  		};
  	},
    computed:{
      ...mapGetters('mycart',['getTotal'])
    },
    onShow() {
      this.setBadge()
    },
    watch:{
      getTotal() {
        this.setBadge()
      }
    },
    methods:{
      setBadge() {
        uni.setTabBarBadge({
          index:2,
          text:this.getTotal + ''
        })
      }
    }
  }